package com.hxzy.tms;

import org.apache.commons.lang3.StringUtils;

public final class Assert {

    public static final void notEmpty(Object data, String message) {
        if (data == null) {
            throw new IllegalArgumentException(message);
        }
    }
    
    public static final void equal(Object data1, Object data2, String message) {
        if (!data1.equals(data2)) {
            throw new IllegalArgumentException(message);
        }
    }

    public static final void notBlank(String data, String message) {
        if (StringUtils.isBlank(data)) {
            throw new IllegalArgumentException(message);
        }
    }

    public static final void greaterThan(Long v1, Long v2, String message) {
        if (v1 <= v2) {
            throw new IllegalArgumentException(message);
        }
    }
}
